# Contributor: Jakob Meier <comcloudway@ccw.icu>
# Maintainer: Jakob Meier <comcloudway@ccw.icu>
pkgname=py3-colorthief
pkgver=0.2.1
pkgrel=0
pkgdesc="Grabs the dominant color or a representative color palette from an image."
url="http://lokeshdhakar.com/projects/color-thief/"
arch="noarch"
license="BSD-3-Clause"
subpackages="$pkgname-pyc"
depends="py3-pillow"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
source="https://github.com/fengsp/color-thief-py/archive/$pkgver/color-thief-py-$pkgver.tar.gz"
builddir="$srcdir/color-thief-py-$pkgver"
options="!check"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
406c2eaf5e405ff7878444908161ca47628aef592c8e7c473a606f0eeb87957cf3ba6c146f7ba66a6fcd39cf6cd716ff7544be3832bbe0060b7abe8970b0c2d2  color-thief-py-0.2.1.tar.gz
"
